* 11 August 2025
* REPLICATION FILE FOR "The Determinants of Post-Sanctions Economic Recovery"
* by Dongan Tan & Hoan La

********************************************************************************
********************************* MAIN TEXT ************************************
********************************************************************************
*** USING GSDB DATASET

** TABLE 2: Log-normal Duration Model Estimates of Recovery
// Model 1 (full model)
stset recover_time, f(recover==1) exit(exit_year==1) id(test_id)

streg ge pv FDI_ch trade sanc_duration sanc_duration_squared presanc_gdppc conflict polity success other_sanc number_sanc sender_mult recover_num, noconstant dist(lnormal) nolog cluster(id)
	
** FIGURE 1: Predicted Recovery Time by Governance and FDI Levels
margins, at(ge=(-1.5(0.25)2) trade=0 success=0 conflict=0 other_sanc=0 sender_mult=0) atmeans predict(time) vce(unconditional)
marginsplot, xlabel(-1.5(0.7)2) ylabel(0(3)12) ytitle("Predicted recovery time (in years)") scheme(s1color) title("")

margins, at(FDI_ch=(13(1)25) trade=0 success=0 conflict=0 other_sanc=0 sender_mult=0) atmeans predict(time) vce(unconditional)
marginsplot, xlabel(13(3)25) ytitle("Predicted recovery time (in years)") xtitle("Δ FDI inflows (logged)") scheme(s1color) title("")

** TABLE 3: Timing Effects of Governance and FDI on Recovery
* (the full table is reported in online appendix TABLE S2)
// governance
streg ge_fiperi ge_seperi ge_thperi pv conflict FDI_ch trade sanc_duration sanc_duration_squared success presanc_gdppc polity other_sanc number_sanc sender_mult recover_num, noconstant dist(lnormal) nolog cluster(id)

// FDI
streg FDI_fiperi FDI_seperi FDI_thperi ge pv conflict sanc_duration trade sanc_duration_squared success presanc_gdppc polity other_sanc number_sanc sender_mult recover_num, noconstant dist(lnormal) nolog cluster(id)

** FIGURE A1: Nonlinear Effect of Sanction Duration on Recovery Time 
streg ge pv FDI_ch c.sanc_duration##c.sanc_duration trade success conflict presanc_gdppc polity other_sanc number_sanc sender_mult recover_num, noconstant dist(lnormal) nolog cluster(id)
margins, at(sanc_duration=(0(1)25))
marginsplot, xlabel(0(5)25) ytitle("Predicted recovery time") xtitle("Sanction duration (years)") scheme(s1color) title("")

********************************************************************************
******************************** ONLINE APPENDIX *******************************
********************************************************************************
*** USING GSDB DATASET

** TABLE S1: Summary Statistics
tabstat recover_time ge pv conflict FDI_ch sanc_duration sanc_duration_squared trade success presanc_gdppc polity other_sanc number_sanc sender_mult recover_num, stats(N mean sd min max) col(stats) format(%9.2f)

** TABLE S3: Timing Effect of Governance and FDI on Recovery
streg c.ge##c.lntime pv conflict c.FDI_ch##c.lntime trade sanc_duration sanc_duration_squared success presanc_gdppc polity other_sanc number_sanc sender_mult recover_num, noconstant dist(lnormal) nolog cluster(id)

** TABLE S5: Recovery Estimates by Duration Model Specifications
// Log-normal
streg ge pv FDI_ch trade sanc_duration sanc_duration_squared presanc_gdppc conflict polity success other_sanc number_sanc sender_mult recover_num, noconstant dist(lnormal) nolog cluster(id)
estimates store lognormal

// Weibull
streg ge pv FDI_ch trade sanc_duration sanc_duration_squared presanc_gdppc conflict polity success other_sanc number_sanc sender_mult recover_num, noconstant dist(weibull) nolog cluster(id) time
estimates store weibull

outreg2 using result.doc, label dec(2) sdec(2)

// Exponential
streg ge pv FDI_ch trade sanc_duration sanc_duration_squared presanc_gdppc conflict polity success other_sanc number_sanc sender_mult recover_num, noconstant dist(exponential) nolog cluster(id) time
estimates store exponential

// Log-logistic
streg ge pv FDI_ch trade sanc_duration sanc_duration_squared presanc_gdppc conflict polity success other_sanc number_sanc sender_mult recover_num, noconstant dist(loglogistic) nolog cluster(id) time
estimates store loglogistic

// Cox
stcox ge pv FDI_ch trade sanc_duration sanc_duration_squared presanc_gdppc conflict polity success other_sanc number_sanc sender_mult recover_num, nolog cluster(id)
estimates store cox

** TABLE S4: Model Fit Comparison for Duration Models
est stats lognormal weibull exponential loglogistic cox

** TABLE S6: Duration Model Estimates across Different Recovery Thresholds
// 2% growth (model 1)
stset recover_time1, f(recover1==1) exit(exit_year1==1) id(test_id1)

streg ge pv FDI_ch trade sanc_duration sanc_duration_squared presanc_gdppc conflict polity success other_sanc number_sanc sender_mult recover_num, noconstant dist(lnormal) nolog cluster(id)

// 4% growth (model 3)
stset recover_time2, f(recover2==1) exit(exit_year2==1) id(test_id2)

streg ge pv FDI_ch trade sanc_duration sanc_duration_squared presanc_gdppc conflict polity success other_sanc number_sanc sender_mult recover_num, noconstant dist(lnormal) nolog cluster(id)

** TABLE S9: Log-normal Duration Model Estimates of Recovery (Trade Sanctions Only)
stset recover_time, f(recover==1) exit(exit_year==1) id(test_id)

streg ge pv FDI_ch sanc_duration sanc_duration_squared presanc_gdppc conflict polity success other_sanc number_sanc sender_mult recover_num if trade==1, noconstant dist(lnormal) nolog cluster(id)

** TABLE S10: Log-normal Duration Model Estimates of Recovery (Lagged Covariates)
// model 1 (full model)
streg L1_ge L1_pv FDI_ch trade sanc_duration sanc_duration_squared success presanc_gdppc L1_conflict L1_polity other_sanc number_sanc sender_mult recover_num, noconstant dist(lnormal) nolog cluster(id)

*** USING IST DATASET

** TABLE S7: Log-normal Duration Model Estimates of Recovery (Using IST Dataset)
// model 1 (full model)
stset recover_time, f(recover==1) exit(exit_year==1) id(test_id)

streg ge pv FDI_ch cost sanc_duration sanc_duration_squared presanc_gdppc conflict polity sanc_num multisanc recover_num, noconstant dist(lnormal) nolog cluster(ccode)

** TABLE S8: Timing Effects of Governance and FDI on Recovery (Using IST Dataset)
streg ge_fiperi ge_seperi ge_thperi pv conflict FDI_ch sanc_duration sanc_duration_squared presanc_gdppc polity sanc_num multisanc recover_num, noconstant dist(lnormal) nolog cluster(ccode)

streg FDI_fiperi FDI_seperi FDI_thperi ge pv conflict sanc_duration sanc_duration_squared presanc_gdppc polity sanc_num multisanc recover_num, noconstant dist(lnormal) nolog cluster(ccode)
